var o = getApp();

Page({
    data: {
        userInfo: {},
        has_one_school: {},
        has_one_roles: {},
        school_id: 0,
        roles_id: 0
    },
    onLoad: function(o) {
        this.data.school_id = o.school_id, this.data.roles_id = o.roles_id, this.getData();
    },
    onReady: function() {},
    getData: function() {
        var s = this, a = this.data, e = a.school_id, n = a.roles_id, t = o.getNetAddresss("plugin.school-company.api.school-center.school");
        o._postNetWork({
            url: t,
            data: {
                school_id: e,
                roles_id: n
            },
            success: function(a) {
                var e = a.data;
                if (1 != e.result) return o.tips(e.msg);
                s.setData({
                    userInfo: e.data,
                    has_one_school: e.data.member_school.has_one_school,
                    has_one_roles: e.data.member_school.has_one_roles
                });
            }
        });
    },
    gotoRecord: function() {
        wx.navigateTo({
            url: "/packageH/schoolCompany/schoolCompanyRecord/schoolCompanyRecord?school_id=" + this.data.school_id
        });
    },
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});